package com.forekonw.deomlianxi;
public class Ceyan3 {
    public static void main(String[] args) {
        int[] array = new int[8];
        array[0] = 18;
        array[1] = 25;
        array[2] = 7;
        array[3] = 36;
        array[4] = 13;
        array[5] = 2;
        array[6] = 89;
        array[7] = 63;
        int nob =array[0];
        int i =0;
        int j =0;
        for (i =1;i<array.length;i++){
            if (nob>array[i]){
                nob =array[i];
                j = i;
            }
        }
        System.out.println("数组中最大的数为" + nob + "其下标为 "+ j);
    }
}
